<?php

namespace app\admin\model\live;

use app\admin\model\goods\Brand;
use app\admin\model\goods\Goods;
use think\Model;

/**
 * Brand
 */
class Temp extends Model
{
    // 表名
    protected $name = 'live_order_temp';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;


    public function goods(){
        return $this->hasOne(Goods::class, 'id', 'goods_id');
    }

    public function brand(){
        return $this->hasOneThrough(Brand::class, Goods::class, 'id', 'id', 'goods_id', 'goods_brand_id');
    }

//    public function

}